import request from '/@/utils/request';

// 查询平台推广员列表
export function listPromoter(query?: Object) {
  return request({
    url: '/module/promoter/list',
    method: 'get',
    params: query
  })
}

// 查询平台推广员列表
export function checkListPromoter(query?: Object) {
  return request({
    url: '/module/promoter/checkList',
    method: 'get',
    params: query
  })
}

// 查询平台推广员详细
export function getPromoter(id?: number) {
  return request({
    url: '/module/promoter/' + id,
    method: 'get'
  })
}

// 新增平台推广员
export function addPromoter(data?: Object) {
  return request({
    url: '/module/promoter',
    method: 'post',
    data: data
  })
}

// 修改平台推广员
export function updatePromoter(data?: Object) {
  return request({
    url: '/module/promoter/check',
    method: 'put',
    data: data
  })
}

// 审核平台推广员
export function checkPromoter(data?: Object) {
  return request({
    url: '/module/promoter',
    method: 'put',
    data: data
  })
}

// 删除平台推广员
export function delPromoter(id?: number) {
  return request({
    url: '/module/promoter/' + id,
    method: 'delete'
  })
}

// 导出平台推广员
export function exportPromoter(query?: Object) {
  return request({
    url: '/module/promoter/export',
    method: 'get',
    params: query
  })
}


// 重置二维码
export function resetQrCode(data?: Object) {
  return request({
    url: '/module/promoter/resetQrCode',
    method: 'post',
    data: data
  })
}
